import request from '@/utils/request'

// 获取权限列表
export const getPermissionList = () => {
  return request.get('/sys/permission')
}

// 新增权限点
export const addPermission = (data) => {
  return request.post('/sys/permission', data)
}

// 删除权限点
export const deletePermission = (id) => {
  return request.delete(`/sys/permission/${id}`)
}

// 获取权限点详情
export const getPermissionDetail = (id) => {
  return request.get(`/sys/permission/${id}`)
}

// 更新权限点
export const updatePermission = (data) => {
  return request.put(`/sys/permission/${data.id}`, data)
}
